<template>
  <div class="app-container">
    <!-- 左部分 -->
    <div class="nth-right-top">
      <template>
        <div>
          <el-row>
            <el-col :span="24">
              <div class="grid-content bg-purple-dark">
                <el-button type="info" plain class="fanhui">
                  <i class="el-icon-back" @click="qx">返回</i>
                </el-button>
              </div>
            </el-col>
          </el-row>
          <el-tabs
            :tab-position="tabPosition"
            style="height: 200px;"
            label="top"
            class="el-tabs__nav-scr"
          >
            <el-tab-pane label="网络参数">
              <div class="setNetInfoesss">
                <span class="setNet">修改密码</span>
                <el-divider></el-divider>

                <el-form ref="formesData" :data="formesData" label-width="150px">
                  <el-form-item label="设备名称" prop="deviceName">
                    <el-input
                      placeholder="请输入设备名称"
                      readonly
                      v-model="deviceName"
                      :style="{width: '260px'}"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="原密码" prop="oldPass" style="margin-bottom: 10px;">
                    <el-input
                      v-model="form.oldPass"
                      placeholder="请输入原密码"
                      @input.native="oldPasses($event)"
                      show-password
                      :style="{width: '260px'}"
                    ></el-input>
                    <span class="errores" style="display:none" id="oldPasse">请输入原密码</span>
                  </el-form-item>
                  <el-form-item label="新密码" prop="newPass">
                    <el-input
                      class="inputes"
                      v-model="form.newPass"
                      placeholder="请输入新密码"
                      @input.native="newPasses($event)"
                      show-password
                      :style="{width: '260px'}"
                    ></el-input>
                    <span class="errores" style="display:none" id="newPasse">请输入新密码</span>
                  </el-form-item>
                  <el-col :span="24">
                    <el-button
                      type="primary"
                      class="primaryes"
                      @click="getactiops"
                      plain
                      :disabled="submitDisabledes"
                      size="small"
                    >设置密码</el-button>
                    <el-button type="info" plain size="small" @click="qx">取消</el-button>
                  </el-col>
                </el-form>
              </div>
              <div class="setNetInfoes">
                <span class="setNet">有线网络配置</span>
                <el-divider></el-divider>

                <el-form ref="formesData" :data="formesData" label-width="150px">
                <el-form-item label="设备IP" prop="setip">
                    <el-input  placeholder="请输入设备ip"  v-model="setip"  :style="{width: '260px'}"></el-input>
                  </el-form-item>
                  <el-form-item label="设备IP" prop="ip" style="display: none">
                    <el-input v-model="ip" placeholder="请输入设备IP" readonly :style="{width: '260px'}"></el-input>
                  </el-form-item>
                  <el-form-item label="子网掩码" prop="subnetMask">
                    <el-input
                      v-model="formesData.subnetMask"
                      placeholder="请输入子网掩码"
                      @input.native="subnetMasks($event)"
                      :style="{width: '260px'}"
                    ></el-input>
                    <span
                      class="errores"
                      style="display:none"
                      id="subnetMaskdatas"
                    >{{subnetMaskdata}}</span>
                  </el-form-item>
                  <el-form-item label="网关" prop="gateway">
                    <el-input
                      v-model="formesData.gateway"
                      placeholder="请输入网关"
                      @input.native="gateways($event)"
                      :style="{width: '260px'}"
                    ></el-input>
                    <span class="errores" style="display:none" id="gatewayes">{{ wangguan}}</span>
                  </el-form-item>
                  <el-form-item label="DNS" prop="DNS">
                    <el-input
                      v-model="formesData.DNS"
                      placeholder="请输入DNS"
                      @input.native="DNSs($event)"
                      :style="{width: '260px'}"
                    ></el-input>
                    <span class="errores" style="display:none" id="DNSes">{{ dns}}</span>
                  </el-form-item>
                  <el-col :span="13">
                    <el-form-item label="ip获取模式" prop="isDHCPMod">
                      <el-select
                        v-model="formesData.isDHCPMod"
                        placeholder="请选择ip获取模式"
                        style="width:260px"
                      >
                        <el-option
                          v-for="item in isDHCPModoption"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="24">
                    <el-button
                      type="primary"
                      class="primaryes"
                      @click="getsetNetInfo"
                      plain
                      :disabled="submitDisabledes"
                      size="small"
                    >设置</el-button>
                    <el-button type="info" plain size="small" @click="qx">取消</el-button>
                  </el-col>
                </el-form>
              </div>
              <div class="setNetInfoes">
                <span class="setNet">无线网络配置</span>
                <el-divider></el-divider>

                <el-form ref="formeData" :data="formeData" label-width="150px">
                  <el-form-item label="Wifi名称" prop="ssId">
                    <el-input
                      placeholder="请输入Wifi名称"
                      v-model="formeData.ssId"
                      :style="{width: '260px'}"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="Wifi密码" prop="pwd">
                    <el-input
                      placeholder="请输入Wifi密码"
                      v-model="formeData.pwd"
                      :style="{width: '260px'}"
                    ></el-input>
                  </el-form-item>
                  <el-form-item label="设备IP" prop="ip">
                    <el-input v-model="ip" placeholder="请输入设备IP" readonly :style="{width: '260px'}"></el-input>
                  </el-form-item>
                  <el-form-item label="网关" prop="gateway">
                    <el-input
                      v-model="formeData.gateway"
                      placeholder="请输入网关"
                      @input.native="gateways($event)"
                      :style="{width: '260px'}"
                    ></el-input>
                    <span class="errores" style="display:none" id="gatewayes">{{ wangguan}}</span>
                  </el-form-item>
                  <el-form-item label="DNS" prop="DNS">
                    <el-input
                      v-model="formeData.DNS"
                      placeholder="请输入DNS"
                      @input.native="DNSs($event)"
                      :style="{width: '260px'}"
                    ></el-input>
                    <span class="errores" style="display:none" id="DNSes">{{ dns}}</span>
                  </el-form-item>
                  <el-col :span="13">
                    <el-form-item label="ip获取模式" prop="isDHCPMod">
                      <el-select
                        v-model="formeData.isDHCPMod"
                        placeholder="请选择ip获取模式"
                        style="width:260px"
                      >
                        <el-option
                          v-for="item in isDHCPModoption"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        ></el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="24">
                    <el-button
                      type="primary"
                      class="primaryes"
                      @click="getsetNetInfo"
                      plain
                      :disabled="submitDisabledes"
                      size="small"
                    >设置</el-button>
                    <el-button type="info" plain size="small" @click="qx">取消</el-button>
                  </el-col>
                </el-form>
              </div>
              <el-divider></el-divider>
            </el-tab-pane>

            <el-tab-pane label="基本参数">
              <div>
                <el-row :gutter="24">
                  <el-form
                    ref="formData"
                    :rules="rules"
                    :model="formData"
                    size="medium"
                    label-width="125px"
                  >
                    <el-col :span="24">
                      <el-form-item label="设备名称">
                        <el-input
                          v-model="deviceName"
                          placeholder="请点击左边选中设备"
                          readonly
                          style="width:220px"
                        ></el-input>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="应用/设备组名称" prop="applicationName">
                        <el-input
                          v-model="formData.applicationName"
                          placeholder="请输入应用/设备组名称"
                          style="width:220px"
                        ></el-input>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="公司名称" prop="companyName">
                        <el-input
                          v-model="formData.companyName"
                          placeholder="请输入公司名称"
                          style="width:220px"
                        ></el-input>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="人证比对(白名单)" prop="displayModStrangerType">
                        <el-radio v-model="formData.whitelist" :label="1">关</el-radio>
                        <el-radio v-model="formData.whitelist" :label="2">直接人证比对</el-radio>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="语音模式" prop="ttsModType">
                        <el-select
                          v-model="formData.ttsModType"
                          placeholder="请选择语音模式"
                          style="width:220px"
                          @change="currentSel"
                        >
                          <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item
                        label="语音自定义"
                        style="display:none"
                        id="ttsModContent"
                        prop="ttsModContent"
                      >
                        <el-input
                          v-model="formData.ttsModContent"
                          placeholder="请输入语音自定义"
                          style="width:220px"
                          @input.native="ttsModContentdata($event)"
                        ></el-input>
                        <span class="errores" style="display:none" id="tts">请输入语音自定义</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="识别距离" prop="identifyDistance">
                        <el-select
                          v-model="formData.identifyDistance"
                          placeholder="请选择识别距离"
                          style="width:220px"
                        >
                          <el-option
                            v-for="item in identifyDistanceoption"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>

                    <el-col :span="24">
                      <el-form-item label="识别分数" prop="identifyScores">
                        <el-input
                          v-model="formData.identifyScores"
                          placeholder="请输入识别分数"
                          type="number"
                          @input.native="identifyScoresdata($event)"
                          style="width:220px"
                        ></el-input>
                        <i
                          id="idents"
                          class="el-icon-warning-outline"
                        >请输入 50-100 之间的整数。分数越高，识别准确率越高，但识别速度会变慢</i>
                        <span class="errores" style="display:none" id="ident">请输入0-100之间的整数</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="显示模式" prop="displayModType">
                        <el-select
                          v-model="formData.displayModType"
                          placeholder="请选择显示模式"
                          @change="currentdisplayModType"
                          style="width:220px"
                        >
                          <el-option
                            v-for="item in displayModTypoption"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                            :disabled="item.disabled"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item
                        label="显示自定义"
                        style="display:none"
                        id="displayModContent"
                        prop="displayModContent"
                      >
                        <el-input
                          v-model="formData.displayModContent"
                          placeholder="请输入显示自定义"
                          @input.native="displayModContentes($event)"
                          style="width:220px"
                        ></el-input>
                        <span
                          class="errores"
                          style="display:none"
                          id="displayModContentess"
                        >请输入显示自定义内容</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="多人脸检测" prop="multiplayerDetection">
                        <el-radio v-model="formData.multiplayerDetection" :label="1">识别多人脸</el-radio>
                        <el-radio v-model="formData.multiplayerDetection" :label="2">识别单人脸</el-radio>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="识别间隔" prop="regInterval">
                        <el-input
                          v-model="formData.regInterval"
                          placeholder="请输入识别间隔"
                          type="number"
                          @input.native="regIntervaldata($event)"
                          style="width:220px"
                        >
                          <template slot="append">毫秒</template>
                        </el-input>
                        <i id="regIntervaleses" class="el-icon-warning-outline">设置范围：500~25500ms</i>
                        <span
                          class="errores"
                          style="display:none"
                          id="regIntervales"
                        >请输入500~25500ms之间的整数</span>
                      </el-form-item>
                    </el-col>

                    <el-col :span="24">
                      <el-form-item label="开门延时" prop="delayTimeForCloseDoor">
                        <el-input
                          v-model="formData.delayTimeForCloseDoor"
                          placeholder="请输入开门延时（默认500）"
                          type="number"
                          id="delayTimeForCloseDoors"
                          @input.native="delayTime($event)"
                          style="width:220px"
                        >
                          <template slot="append">毫秒</template>
                        </el-input>
                        <i id="delayTimeeses" class="el-icon-warning-outline">
                          请输入
                          100-25500 之间的整数，向下取整百。如：输入 101-199 之间的
                          整数，实际生效的是 100ms。
                        </i>
                        <span class="errores" style="display:none" id="delayTimees">参数：100-25500(整数)</span>
                      </el-form-item>
                    </el-col>

                    <el-col :span="24">
                      <el-form-item label="串口模式" prop="serialOutMode">
                        <el-select
                          v-model="formData.serialOutMode"
                          placeholder="请选择串口模式"
                          @change="currentSelserialOutMode"
                        >
                          <el-option
                            v-for="item in serialOutModeoption"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>

                    <el-col :span="24">
                      <el-form-item
                        label="串口自定义"
                        style="display:none"
                        id="serialOutContent"
                        prop="serialOutContent"
                      >
                        <el-input
                          v-model="formData.serialOutContent"
                          placeholder="请输入串口自定义"
                          @input.native="serialOutContentes($event)"
                          style="width:220px"
                        ></el-input>
                        <span
                          class="errores"
                          style="display: none"
                          id="serialOutContentess"
                        >请输入串口自定义内容</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="陌生人开关" prop="displayModStrangerType">
                        <el-radio v-model="formData.displayModStrangerType" :label="1">不识别</el-radio>
                        <el-radio v-model="formData.displayModStrangerType" :label="2">自定义</el-radio>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="陌生人判断次数" prop="recStrangerTimesThreshold">
                        <el-input
                          v-model="formData.recStrangerTimesThreshold"
                          placeholder="请输入陌生人判断次数"
                          style="width:220px"
                          type="number"
                          @input.native="number($event)"
                        ></el-input>
                        <i id="recStraneses" class="el-icon-warning-outline">
                          传入值请选择 1-20 之间
                          的整数，1 表示快速判定但精确率最低，随着数值增加，判定时间
                          增加，精确度提高
                        </i>
                        <span class="errores" style="display: none" id="recStranes">请输入1-20之间的整数</span>
                      </el-form-item>
                    </el-col>

                    <el-col :span="24">
                      <el-form-item label="陌生人语音模式" prop="ttsModStrangerType">
                        <el-select
                          v-model="formData.ttsModStrangerType"
                          placeholder="请选择陌生人语音模式"
                          style="width:220px"
                          @change="currentSelttsModStrangerType"
                        >
                          <el-option
                            v-for="item in ttsModStrangerTypeoption"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>

                    <el-col :span="24">
                      <el-form-item
                        label="陌生人语音自定义"
                        style="display:none"
                        id="displayModStrangerContent"
                        prop="displayModStrangerContent"
                      >
                        <el-input
                          v-model="formData.displayModStrangerContent"
                          placeholder="请输入陌生人语音自定义"
                          @input.native="displayModStrangerContentes($event)"
                          style="width:220px"
                        ></el-input>
                        <span
                          class="errores"
                          style="display: none"
                          id="displayModStrangerContentess"
                        >请输入陌生人语音自定义内容</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="24">
                      <el-form-item label="韦根输出" prop="wgInputType">
                        <el-select
                          v-model="formData.wgInputType"
                          placeholder="请选择下拉选择"
                          style="width:220px"
                        >
                          <el-option
                            v-for="item in wgInputTypeoption"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>

                    <el-col :span="24">
                      <el-form-item label="照片防伪等级" prop="recRank">
                        <el-radio-group v-model="formData.recRank" style="margin-bottom: 30px;">
                          <el-radio-button label="1">非活体</el-radio-button>
                          <el-radio-button label="2">活体</el-radio-button>
                        </el-radio-group>
                      </el-form-item>
                    </el-col>

                    <el-col :span="24">
                      <el-form-item size="large">
                        <el-button
                          type="primary"
                          @click="submitFormes"
                          :disabled="submitDisabled"
                          class="shenum"
                          size="small"
                          plain
                        >设置参数</el-button>
                        <el-button type="info" size="small" plain @click="qx">取消</el-button>
                      </el-form-item>
                    </el-col>
                  </el-form>
                </el-row>
              </div>
            </el-tab-pane>

            <el-tab-pane label="识别模式参数">
              <el-form ref="forms" :rules="rules" :model="forms" label-width="150px">
                <el-form-item label="设备名称">
                  <el-input v-model="deviceName" placeholder="请输入设备名称" readonly style="width:200px"></el-input>
                </el-form-item>
                <el-form-item label="刷脸">
                  <el-radio v-model="forms.recModeFaceEnable" label="1">开</el-radio>
                  <el-radio v-model="forms.recModeFaceEnable" label="2">关</el-radio>
                </el-form-item>
                <el-form-item label="人脸识别阈值" prop="recDoubleValue">
                  <el-input
                    v-model="forms.recDoubleValue"
                    type="number"
                    style="width:200px"
                    @input.native="recDoubleValuess($event)"
                  ></el-input>
                  <i id="recDoubleValueses" class="el-icon-warning-outline">
                    请输入 50-100 之间的整数。分数越高，识别准确率越高，
                    但识别速度会变慢
                  </i>
                  <span class="errores" style="display: none" id="recDoubleValues">人脸识别阈值:0-100(整数)</span>
                </el-form-item>
                <el-form-item label="刷卡">
                  <el-radio v-model="forms.recModeCardEnable" :label="1" @change="getValue">开</el-radio>
                  <el-radio v-model="forms.recModeCardEnable" :label="2" @change="getValue">关</el-radio>
                </el-form-item>
                <el-form-item label="外设接口">
                  <el-select v-model="forms.recModeCardIntf" placeholder="请选择外设接口">
                    <el-option
                      v-for="item in recModeCardIntfoption"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="外设类型">
                  <el-select v-model="forms.recModeCardHardware" placeholder="请选择外设类型">
                    <el-option
                      v-for="item in recModeCardHardwareoption"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="卡+人脸双重认证">
                  <el-radio v-model="forms.recModeCardFaceEnable" :label="1" @change="getValues">开</el-radio>
                  <el-radio v-model="forms.recModeCardFaceEnable" :label="2" @change="getValues">关</el-radio>
                </el-form-item>
                <el-form-item label="外设接口" id="recModeCardFaceIntf" style="display:none">
                  <el-select v-model="forms.recModeCardFaceIntf" placeholder="请选择外设接口">
                    <el-option
                      v-for="item in recModeCardFaceIntfoption"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="外设类型" id="recModeCardFaceHardware" style="display:none">
                  <el-select v-model="forms.recModeCardFaceHardware" placeholder="请选择外设类型">
                    <el-option
                      v-for="item in recModeCardFaceHardwareoption"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>

                <el-form-item label="人证比对">
                  <el-radio v-model="forms.recModeIdcardFaceEnable" label="1">开</el-radio>
                  <el-radio v-model="forms.recModeIdcardFaceEnable" label="2">关</el-radio>
                </el-form-item>
                <el-form-item label="外设接口">
                  <el-select v-model="forms.recModeCardFaceHardware" placeholder="请选择外设接口">
                    <el-option
                      v-for="item in recModeIdcardFaceIntfoption"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="外设类型">
                  <el-select v-model="forms.recModeIdcardFaceHardware" placeholder="请选择外设类型">
                    <el-option
                      v-for="item in recModeIdcardFaceHardwareoption"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="对比阀值" prop="recCardFaceValue">
                  <el-input
                    v-model="forms.recCardFaceValue"
                    type="number"
                    style="width:200px"
                    @input.native="recCardFaceValues($event)"
                  ></el-input>
                  <i id="recCardFaceValuess" class="el-icon-warning-outline">
                    请输入 50-100 之间的整数。分数越高，识别准确率越高，
                    但识别速度会变慢
                  </i>
                  <span class="errores" style="display: none" id="recCardFaceValues">请输入0-100之间的整数</span>
                </el-form-item>
                <br />
                <el-form-item>
                  <el-button
                    type="primary"
                    @click="onSubmit"
                    size="small"
                    plain
                    :disabled="suDisabled"
                  >识别模式设置</el-button>
                  <el-button type="info" plain size="small" @click="qx">取消</el-button>
                </el-form-item>
              </el-form>
            </el-tab-pane>

            <el-tab-pane label="回调参数">
              <div class="tab-pane-top">
                <el-row :gutter="15">
                  <el-form
                    ref="elForm"
                    :model="Datalist"
                    :rules="rules"
                    size="medium"
                    label-width="100px"
                  >
                    <el-col :span="13">
                      <el-form-item label="服务器IP" prop="ips">
                        <el-input
                          v-model="Datalist.ips"
                          placeholder="请输入服务器IP"
                          :style="{width: '100%'}"
                        ></el-input>
                        <span class="errores" style="display: none" id="recCardFaceValu">请输入服务器IP</span>
                      </el-form-item>
                      <br />
                    </el-col>
                    <el-col :span="13">
                      <el-form-item label="端口" prop="port">
                        <el-input
                          v-model="Datalist.port"
                          placeholder="请输入端口"
                          :style="{width: '100%'}"
                        ></el-input>
                        <span class="errores" style="display: none" id="portes">请输入端口</span>
                      </el-form-item>
                    </el-col>
                    <el-col :span="13" style="margin-top: 10px">
                      <el-form-item label="心跳时间" prop="interval">
                        <el-input
                          v-model="Datalist.interval"
                          placeholder="请输入心跳时间"
                          :style="{width: '100%'}"
                        ></el-input>
                      </el-form-item>
                    </el-col>
                  </el-form>
                </el-row>
                <el-col>
                <div class="shaye">
                <el-button
                  type="primary"
                  plain
                  size="small"
                  @click="huidiao">设置回调参数</el-button>
                <el-button
                  type="primary"
                  plain
                  size="small"
                  @click="xintiao">设置心跳参数</el-button>
                  <el-button
                    type="primary"
                    plain
                    size="small"
                    @click="zhucezhao">设置注册照片回调</el-button>
                <el-button type="info" plain size="small"  @click="qx">取消</el-button>
                </div>
                </el-col>
              </div>
              <div>
                <span><h3>信息提示</h3><el-button @click="woful">获取回调信息</el-button></span>
                <ul class="infinite-list"  style="overflow:auto">
                  <li v-for="i in jihe" class="infinite-list-item">{{i}}</li>
                </ul>
              </div>
            </el-tab-pane>
            <el-tab-pane label="远程操作">
              <div class="servet tab-pane-top">
                <br />
                <el-form ref="form" :model="formes" :rules="rules" label-width="150px">
                  <el-form-item label="设备名称">
                    <el-input
                      v-model="deviceName"
                      placeholder="请输入设备名称"
                      readonly
                      :style="{width: '210px'}"
                    ></el-input>
                  </el-form-item>

                  <el-form-item label="序列号" prop="serialNum">
                    <el-input
                      v-model="formes.serialNum"
                      placeholder="请读取设备序列号"
                      readonly
                      :style="{width: '210px'}"
                    ></el-input>
                  </el-form-item>

                </el-form>
                <el-button type="primary" class="btnprim" size="small" @click="getip">读取序列号</el-button>

                <div class="czhite">
                  <el-button type="primary" plain class="btnin3" size="small" @click="chzhi">设备重置</el-button>
                  <el-button type="info" plain class="btnprimes" size="small" @click="qx">取消</el-button>
                  <el-switch
                    class="ratex"
                    v-model="radio"
                    active-text="删除所有数据"
                    inactive-text="删除部分数据"
                  ></el-switch>
                </div>
              </div>
            </el-tab-pane>
<!--            <el-tab-pane label="显示参数">-->
<!--              <div class="setNetInfoess">-->
<!--                <span class="setNet">设置屏幕方向</span>-->
<!--                <el-divider></el-divider>-->
<!--                <el-form ref="formesData" :data="formesData" label-width="150px">-->
<!--                  <el-form-item label="方向" prop="isDHCPMod">-->
<!--                    <el-select-->
<!--                      v-model="formesData.isDHCPMod"-->
<!--                      placeholder="请选择屏幕方向"-->
<!--                      style="width:260px"-->
<!--                    >-->
<!--                      <el-option-->
<!--                        v-for="item in isDHCPModoption"-->
<!--                        :key="item.value"-->
<!--                        :label="item.label"-->
<!--                        :value="item.value"-->
<!--                      ></el-option>-->
<!--                    </el-select>-->
<!--                  </el-form-item>-->
<!--                  <el-col :span="24">-->
<!--                    <el-button-->
<!--                      type="primary"-->
<!--                      class="primaryes"-->
<!--                      @click="getsetNetInfo"-->
<!--                      plain-->
<!--                      :disabled="submitDisabledes"-->
<!--                      size="small"-->
<!--                    >设置</el-button>-->
<!--                    <el-button type="info" plain size="small" @click="qx">取消</el-button>-->
<!--                  </el-col>-->
<!--                </el-form>-->
<!--              </div>-->

<!--              <div class="setNetInfoesss">-->
<!--                <span class="setNet">修改Login</span>-->
<!--                <el-divider></el-divider>-->
<!--                <el-form ref="formesData" :data="formesData" label-width="150px">-->
<!--                  <div class="formse">-->
<!--                    <el-upload-->
<!--                      class="uploader"-->
<!--                      action="#"-->
<!--                      list-type="picture-card"-->
<!--                      :auto-upload="false"-->
<!--                    >-->
<!--                      <i slot="default" class="el-icon-plus"></i>-->
<!--                      <div slot="file" slot-scope="{file}">-->
<!--                        <img class="el-upload-list__item-thumbnail" :src="file.url" alt />-->
<!--                        <span class="el-upload-list__item-actions">-->
<!--                          <span-->
<!--                            class="el-upload-list__item-preview"-->
<!--                            @click="handlePictureCardPreview(file)"-->
<!--                          >-->
<!--                            <i class="el-icon-zoom-in"></i>-->
<!--                          </span>-->
<!--                          <span-->
<!--                            v-if="!disabled"-->
<!--                            class="el-upload-list__item-delete"-->
<!--                            @click="handleDownload(file)"-->
<!--                          >-->
<!--                            <i class="el-icon-download"></i>-->
<!--                          </span>-->
<!--                          <span-->
<!--                            v-if="!disabled"-->
<!--                            class="el-upload-list__item-delete"-->
<!--                            @click="handleRemove(file)"-->
<!--                          >-->
<!--                            <i class="el-icon-delete"></i>-->
<!--                          </span>-->
<!--                        </span>-->
<!--                      </div>-->
<!--                    </el-upload>-->
<!--                  </div>-->
<!--&lt;!&ndash;                  <el-dialog :visible.sync="dialogVisible">&ndash;&gt;-->
<!--&lt;!&ndash;                    <img width="100%" :src="dialogImageUrl" alt />&ndash;&gt;-->
<!--&lt;!&ndash;                  </el-dialog>&ndash;&gt;-->
<!--                  <el-col :span="24">-->
<!--                    <el-button-->
<!--                      type="primary"-->
<!--                      @click="getsetNetInfo"-->
<!--                      class="xuanze"-->
<!--                      plain-->
<!--                      :disabled="submitDisabledes"-->
<!--                      size="small"-->
<!--                    >选择logn</el-button>-->
<!--                    <el-button-->
<!--                      type="primary"-->
<!--                      class="primaryesss"-->
<!--                      @click="getsetNetInfo"-->
<!--                      plain-->
<!--                      :disabled="submitDisabledes"-->
<!--                      size="small"-->
<!--                    >修改logn</el-button>-->
<!--                    <el-button type="info" plain size="small" @click="qx">清除</el-button>-->
<!--                  </el-col>-->
<!--                </el-form>-->
<!--              </div>-->
<!--              <div class="setNetInfoess">-->
<!--                <span class="setNet">大屏显示模式</span>-->
<!--                <el-divider></el-divider>-->
<!--                <el-form ref="formesData" :data="formesData" label-width="150px">-->
<!--                  <el-form-item label="方向" prop="isDHCPMod">-->
<!--                    <el-select-->
<!--                      v-model="formesData.isDHCPMod"-->
<!--                      placeholder="请选择屏幕方向"-->
<!--                      style="width:260px"-->
<!--                    >-->
<!--                      <el-option-->
<!--                        v-for="item in isDHCPModoption"-->
<!--                        :key="item.value"-->
<!--                        :label="item.label"-->
<!--                        :value="item.value"-->
<!--                      ></el-option>-->
<!--                    </el-select>-->
<!--                  </el-form-item>-->
<!--                  <el-col :span="24">-->
<!--                    <el-button-->
<!--                      type="primary"-->
<!--                      class="primaryes"-->
<!--                      @click="getsetNetInfo"-->
<!--                      plain-->
<!--                      :disabled="submitDisabledes"-->
<!--                      size="small"-->
<!--                    >设置</el-button>-->
<!--                    <el-button type="info" plain size="small" @click="qx">取消</el-button>-->
<!--                  </el-col>-->
<!--                </el-form>-->
<!--              </div>-->
<!--              <div class="setNetInfoesss">-->
<!--                <span class="setNet">背景图配置</span>-->
<!--                <el-divider></el-divider>-->
<!--                <el-form ref="formesData" :data="formesData" label-width="150px">-->
<!--                  <div class="formse">-->
<!--                    <el-upload-->
<!--                      class="uploader"-->
<!--                      action="#"-->
<!--                      list-type="picture-card"-->
<!--                      :auto-upload="false"-->
<!--                    >-->
<!--                      <i slot="default" class="el-icon-plus"></i>-->
<!--                      <div slot="file" slot-scope="{file}">-->
<!--                        <img class="el-upload-list__item-thumbnail" :src="file.url" alt />-->
<!--                        <span class="el-upload-list__item-actions">-->
<!--                          <span-->
<!--                            class="el-upload-list__item-preview"-->
<!--                            @click="handlePictureCardPreview(file)"-->
<!--                          >-->
<!--                            <i class="el-icon-zoom-in"></i>-->
<!--                          </span>-->
<!--                          <span-->
<!--                            v-if="!disabled"-->
<!--                            class="el-upload-list__item-delete"-->
<!--                            @click="handleDownload(file)"-->
<!--                          >-->
<!--                            <i class="el-icon-download"></i>-->
<!--                          </span>-->
<!--                          <span-->
<!--                            v-if="!disabled"-->
<!--                            class="el-upload-list__item-delete"-->
<!--                            @click="handleRemove(file)"-->
<!--                          >-->
<!--                            <i class="el-icon-delete"></i>-->
<!--                          </span>-->
<!--                        </span>-->
<!--                      </div>-->
<!--                    </el-upload>-->
<!--                  </div>-->
<!--&lt;!&ndash;                  <el-dialog :visible.sync="dialogVisible">&ndash;&gt;-->
<!--&lt;!&ndash;                    <img width="100%" :src="dialogImageUrl" alt />&ndash;&gt;-->
<!--&lt;!&ndash;                  </el-dialog>&ndash;&gt;-->
<!--                  <el-col :span="24">-->
<!--                    <el-button-->
<!--                      type="primary"-->
<!--                      @click="getsetNetInfo"-->
<!--                      plain-->
<!--                      :disabled="submitDisabledes"-->
<!--                      class="xuanze"-->
<!--                      size="small"-->
<!--                    >选择logn</el-button>-->
<!--                    <el-button-->
<!--                      type="primary"-->
<!--                      class="primaryesss"-->
<!--                      @click="getsetNetInfo"-->
<!--                      plain-->
<!--                      :disabled="submitDisabledes"-->
<!--                      size="small"-->
<!--                    >修改logn</el-button>-->
<!--                    <el-button type="info" plain size="small" @click="qx">清除</el-button>-->
<!--                  </el-col>-->
<!--                </el-form>-->
<!--              </div>-->
<!--            </el-tab-pane>-->

<!--            <el-tab-pane label="测温口罩参数">-->
<!--              <div class="setNetInfoes">-->
<!--                <span class="setNet">测温参数</span>-->
<!--                <el-divider></el-divider>-->

<!--                <el-form ref="formesData" :data="formesData" label-width="160px">-->
<!--                  <el-form-item label="设备模式">-->
<!--                    <el-radio-->
<!--                      v-model="forms.recModeCardFaceEnable"-->
<!--                      :label="1"-->
<!--                      @change="getValues"-->
<!--                    >模式一</el-radio>-->
<!--                    <el-radio-->
<!--                      v-model="forms.recModeCardFaceEnable"-->
<!--                      :label="2"-->
<!--                      @change="getValues"-->
<!--                    >模式二</el-radio>-->
<!--                  </el-form-item>-->
<!--                  <el-form-item label="测温模式">-->
<!--                    <el-radio v-model="forms.recModeCardFaceEnable" :label="1" @change="getValues">开</el-radio>-->
<!--                    <el-radio-->
<!--                      v-model="forms.recModeCardFaceEnable"-->
<!--                      :label="2"-->
<!--                      @change="getValues"-->
<!--                      style="margin-left:26px"-->
<!--                    >关</el-radio>-->
<!--                  </el-form-item>-->
<!--                  <el-form-item label="异常温度语音播报">-->
<!--                    <el-radio v-model="forms.recModeCardFaceEnable" :label="1" @change="getValues">开</el-radio>-->
<!--                    <el-radio-->
<!--                      v-model="forms.recModeCardFaceEnable"-->
<!--                      :label="2"-->
<!--                      @change="getValues"-->
<!--                      style="margin-left:26px"-->
<!--                    >关</el-radio>-->
<!--                  </el-form-item>-->

<!--                  <el-form-item label="异常温度语音播报">-->
<!--                    <el-radio-->
<!--                      v-model="forms.recModeCardFaceEnable"-->
<!--                      :label="1"-->
<!--                      @change="getValues"-->
<!--                    >MLX i2C接口</el-radio>-->
<!--                    <el-radio-->
<!--                      v-model="forms.recModeCardFaceEnable"-->
<!--                      :label="2"-->
<!--                      @change="getValues"-->
<!--                    >MLX 232接口</el-radio>-->
<!--                  </el-form-item>-->

<!--                  <el-form-item label="异常温度判断值" prop>-->
<!--                    <el-input placeholder="请输入异常温度判断值" :style="{width: '260px'}"></el-input>-->
<!--                    <span-->
<!--                      class="errores"-->
<!--                      style="display:none"-->
<!--                      id="subnetMaskdatas"-->
<!--                    >{{subnetMaskdata}}</span>-->
<!--                  </el-form-item>-->
<!--                  <el-form-item label="异常温度语音播报内容" prop>-->
<!--                    <el-input placeholder="请输入异常温度语音播报内容" readonly :style="{width: '260px'}"></el-input>-->
<!--                  </el-form-item>-->

<!--                  <el-col :span="24">-->
<!--                    <el-button-->
<!--                      type="primary"-->
<!--                      class="primaryes"-->
<!--                      @click="getsetNetInfo"-->
<!--                      plain-->
<!--                      :disabled="submitDisabledes"-->
<!--                      size="small"-->
<!--                    >设置</el-button>-->
<!--                    <el-button type="info" plain size="small" @click="qx">取消</el-button>-->
<!--                  </el-col>-->
<!--                </el-form>-->
<!--              </div>-->
<!--              &lt;!&ndash; <el-divider></el-divider> &ndash;&gt;-->
<!--              <div class="setNetInfoes">-->
<!--                <span class="setNet">口罩参数</span>-->
<!--                <el-divider></el-divider>-->

<!--                <el-form ref="formeData" :data="formeData" label-width="150px">-->
<!--                  <el-form-item label="设备模式">-->
<!--                    <el-radio v-model="forms.recModeCardFaceEnable" :label="1" @change="getValues">开</el-radio>-->
<!--                    <el-radio v-model="forms.recModeCardFaceEnable" :label="2" @change="getValues">关</el-radio>-->
<!--                  </el-form-item>-->
<!--                  <el-form-item label="设备模式">-->
<!--                    <el-radio v-model="forms.recModeCardFaceEnable" :label="1" @change="getValues">开</el-radio>-->
<!--                    <el-radio v-model="forms.recModeCardFaceEnable" :label="2" @change="getValues">关</el-radio>-->
<!--                  </el-form-item>-->
<!--                  <el-form-item label="异常播报内容" prop="pwd">-->
<!--                    <el-input-->
<!--                      placeholder="请输入异常播报内容"-->
<!--                      v-model="formeData.pwd"-->
<!--                      :style="{width: '260px'}"-->
<!--                    ></el-input>-->
<!--                  </el-form-item>-->

<!--                  <el-col :span="24">-->
<!--                    <el-button-->
<!--                      type="primary"-->
<!--                      class="primaryes"-->
<!--                      @click="getsetNetInfo"-->
<!--                      plain-->
<!--                      :disabled="submitDisabledes"-->
<!--                      size="small"-->
<!--                    >设置</el-button>-->
<!--                    <el-button type="info" plain size="small" @click="qx">取消</el-button>-->
<!--                  </el-col>-->
<!--                </el-form>-->
<!--              </div>-->
<!--              <el-divider></el-divider>-->
<!--            </el-tab-pane>-->
          </el-tabs>
        </div>
      </template>
    </div>
  </div>
</template>

<script>
// import { listAddupda, passint } from "@/api/menjin/updateadd";
import axios from "axios";
export default {
  name: "updateadd",
  ready() {
    this.submitDisabled = false; //初始化为face表示是可以点击的
    this.suDisabled = false; //初始化为face表示是可以点击的
    this.submitDisabledes = false;
  },
  data() {
    return {
      jihe:[],
      submitDisabled: false,
      suDisabled: false,
      submitDisabledes: false,
      wangguan: "",
      subnetMaskdata: "",
      dns: "",
      Datalist: {},
      formesData: {
        gateway: "192.168.24.1",
        subnetMask: "255.255.255.0",
        DNS: "8.8.4.4",
        isDHCPMod: 2,
      },
      formeData: {
        gateway: "192.168.24.0",
        subnetMask: "255.255.255.0",
        DNS: "8.8.4.4",
        isDHCPMod: 2,
      },
      formes: {
        serialNum: "",
      },
      forms: {
        recModeFaceEnable: "1",
        recModeCardEnable: 1,
        recModeCardFaceEnable: 2,
        recModeIdcardFaceEnable: "2",
        recModeCardIntf: 2,
        recModeCardHardware: 1,
        recModeCardFaceIntf: 2,
        recModeCardFaceHardware: 1,
        recModeCardFaceHardware: 3,
        recModeIdcardFaceHardware: 4,
        recCardFaceValue: 30,
        recDoubleValue: 70,
      },
      formData: {
        whitelist: 2,
        ttsModType: 2,
        displayModType: 1,
        delayTimeForCloseDoor: 500,
        multiplayerDetection: 1,
        displayModStrangerType: 1,
        recStrangerTimesThreshold: 3,
        serialOutMode: 1,
        identifyScores: 80,
        ttsModStrangerType: 1,
        recRank: 1,
        displayModStrangerContent: "注意陌生人",
        regInterval: 2000,
        wgInputType: 1,
        identifyDistance: 0,
        ttsModContent: "{name}",
        displayModContent: "{name}",
        serialOutContent: "{name}",
      },
      //ip选择模式
      isDHCPModoption: [
        {
          value: 1,
          label: "DHCP 模式",
        },
        {
          value: 2,
          label: "手动配置模式",
        },
      ],
      //刷卡外接类型
      recModeCardHardwareoption: [
        {
          value: 1,
          label: "IC 读卡器",
        },
        {
          value: 2,
          label: "新中新",
        },
        {
          value: 3,
          label: "精伦",
        },
        {
          value: 4,
          label: "中控",
        },
      ],

      recModeCardIntfoption: [
        {
          value: 1,
          label: "TTL 串口",
        },
        {
          value: 2,
          label: "232 串口",
        },
        {
          value: 3,
          label: "USB",
        },
        {
          value: 4,
          label: "I2C",
        },
      ],
      //人卡合一外设接口

      recModeCardFaceIntfoption: [
        {
          value: 1,
          label: "TTL 串口",
        },
        {
          value: 2,
          label: "232 串口",
        },
        {
          value: 3,
          label: "USB",
        },
        {
          value: 4,
          label: "I2C",
        },
      ],
      recModeCardFaceHardwareoption: [
        {
          value: 1,
          label: "IC读卡器",
        },
        {
          value: 2,
          label: "新中新",
        },
        {
          value: 3,
          label: "精伦",
        },
        {
          value: 4,
          label: "中控",
        },
      ],
      //人证比对外接接口
      recModeIdcardFaceIntfoption: [
        {
          value: 1,
          label: "TTL 串口",
        },
        {
          value: 2,
          label: "232 串口",
        },
        {
          value: 3,
          label: "USB",
        },
        {
          value: 4,
          label: "I2C",
        },
      ],
      //人证比对外接设备
      recModeIdcardFaceHardwareoption: [
        {
          value: 1,
          label: "IC读卡器",
        },
        {
          value: 2,
          label: "新中新",
        },
        {
          value: 3,
          label: "精伦",
        },
        {
          value: 4,
          label: "中控",
        },
      ],
      options: [
        {
          value: 1,
          label: "不播报",
        },
        {
          value: 2,
          label: "播报名字",
        },
        {
          value: 100,
          label: "自定义",
        },
      ],
      identifyDistanceoption: [
        {
          value: 0,
          label: "无限制",
        },
        {
          value: 1,
          label: "0.5 米   以内",
        },
        {
          value: 2,
          label: "1 米以内",
        },
        {
          value: 3,
          label: "1.5 米以内",
        },
        {
          value: 4,
          label: "2 米以内",
        },{
          value: 5,
          label: "2.5 米以内",
        }
      ],
      displayModTypoption: [
        {
          value: 1,
          label: "显示名字",
        },
        {
          value: 2,
          label: "不显示内容",
        },
        {
          value: 100,
          label: "自定义",
        },
      ],

      //串口模式

      serialOutModeoption: [
        {
          value: 1,
          label: "开门",
        },
        {
          value: 2,
          label: "自定义",
        },
        {
          value: 3,
          label: "关闭",
        },
      ],

      // displayModStrangerTypes: 1,
      //陌生人语音播报
      ttsModStrangerTypeoption: [
        {
          value: 1,
          label: "不需要语音播报",
        },
        {
          value: 2,
          label: "识别失败",
        },
        {
          value: 100,
          label: "自定义",
        },
      ],
      //韦根输入
      wgInputTypeoption: [
        {
          value: 1,
          label: "wg26   格式一",
        },
        {
          value: 2,
          label: "wg26   格式二",
        },
        {
          value: 3,
          label: "wg34",
        },
      ],
      recRankoption: [
        {
          value: 1,
          label: "非活体",
        },
        {
          value: 2,
          label: "活体",
        },
      ],

      whitelistoption: [
        {
          value: 1,
          label: "关",
        },
        {
          value: 2,
          label: "直接人证比对",
        },
      ],
      radio: false,
      id: "",
      port: "",
      ip: "",
      setip:"",
      oldPass: "",
      newPass: "",
      deviceName: "",
      devicePass: "",
      tableData: [],
      tabPosition: "top",
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 总条数
      total: 0,
      // 设备基础信息表格数据
      DeviceBaseinfoList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 设备类型字典
      deviceTypeOptions: [],
      // 设备用处字典
      deviceUseOptions: [],
      // 表单参数
      list: [],
      // 应用场景字典
      deviceScenariosOptions: [],
      // 方向字典
      deviceDirectionOptions: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        deviceName: undefined,
        deviceType: undefined,
        deviceUse: undefined,
        deviceScenarios: undefined,
        serialNum: undefined,
        port: undefined,
        ip: undefined,
        devicePass: undefined,
        macAddress: undefined,
        deviceDirection: undefined,
        deviceDesc: undefined,
        crtime: undefined,
        uptime: undefined,
        author: undefined,
        upauthor: undefined,
      },
      // 表单参数
      form: {},
      field101Options: [
        {
          label: "手动配置模式",
          value: 1,
        },
        {
          label: "DHCP模式",
          value: 2,
        },
      ],
      // 表单校验
      rules: {
        ips: [
          { required: true, message: "请输入ip地址", trigger: "blur" },
          {
            pattern: /^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$/,
            message: "IP地址格式错误",
            trigger: "blur",
          },
        ],
        port: [
          { required: true, message: "请输入端口号", trigger: "blur" },
          {
            pattern: /^([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5])$/,
            message: "端口号格式错误",
            trigger: "blur",
          },
        ],
        interval:[

          { required: true, message: "请输入心跳时间", trigger: "blur" }

        ]

      },
    };
  },
  created() {
    this.getList();
    this.getDicts("lg_device_type").then((response) => {
      this.deviceTypeOptions = response.data;
    });
    this.getDicts("lg_device_use").then((response) => {
      this.deviceUseOptions = response.data;
    });
    this.getDicts("lg_scenarios").then((response) => {
      this.deviceScenariosOptions = response.data;
    });
    this.getDicts("lg_direction").then((response) => {
      this.deviceDirectionOptions = response.data;
    });
    this.getParams();
  },
  watch: {
    $route: "getParams",
  },
  mounted() {
    //阻止F5刷新
    this.stopF5Refresh()
    //监听刷新事件
    window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
  },

  methods: {
    //阻止F5刷新
    stopF5Refresh() {
      document.onkeydown = function (e) {
        var evt = window.event || e;
        var code = evt.keyCode || evt.which;
        if (code == 116) {
          if (evt.preventDefault) {
            evt.preventDefault();
          } else {
            evt.keyCode = 0;
            evt.returnValue = false
          }
        }
      }
    },
    //浏览器刷新事件
    beforeunloadHandler (e) {
      if (JSON.parse(localStorage.getItem('havePlay'))&& JSON.parse(localStorage.getItem('havePlay')).currentTime == this.currentTime) {
        window.localStorage.removeItem("havePlay");
      }
    },
    qx() {
      this.$router.push("/lgdz/companydeviceinfo");
    },
    getParams() {
      // 取到路由带过来的参数
      this.id = this.$route.params.id;
      // console.log(this.id);
      this.ip = this.$route.params.ip;
      // console.log(this.ip);
      this.devicePass = this.$route.params.devicePwd;
      // console.log(this.devicePass);
      this.deviceName = this.$route.params.deviceName;
      // console.log(this.deviceName);
    },
    //DNS
    DNSs(e) {
      let xianshi = document.getElementById("DNSes");
      var _value = e.target.value; // 获取到输入框的value值

      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.dns = "DNS不能为空";
        this.submitDisabledes = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabledes = false;
      }
    },
    //子网掩码
    subnetMasks(e) {
      let xianshi = document.getElementById("subnetMaskdatas");
      var _value = e.target.value; // 获取到输入框的value值
      const reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){3}$/;
      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.subnetMaskdata = "子网掩码不能为空";
        this.submitDisabledes = true;
      } else if (!reg.test(_value)) {
        xianshi.style.display = "inline";
        this.subnetMaskdata = "请填写正确的子网掩码";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabledes = false;
      }
    },
    //网关
    gateways(e) {
      let xianshi = document.getElementById("gatewayes");
      var _value = e.target.value; // 获取到输入框的value值
      const reg = /^192\.168(\.(\d|([1-9]\d)|(1\d{2})|(2[0-4]\d)|(25[0-5]))){2}$/;
      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.wangguan = "网关不能为空";
        this.submitDisabledes = true;
      } else if (!reg.test(_value)) {
        xianshi.style.display = "inline";
        this.wangguan = "请填写正确的网关";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabledes = false;
      }
    },
    //新密码
    newPasses(e) {
      let xianshi = document.getElementById("newPasse");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.submitDisabledes = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabledes = false;
      }
    },
    //原密码
    oldPasses(e) {
      let xianshi = document.getElementById("oldPasse");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.submitDisabledes = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabledes = false;
      }
    },
    //陌生人语音自定义
    displayModStrangerContentes(e) {
      let xianshi = document.getElementById("displayModStrangerContentess");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.submitDisabled = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabled = false;
      }
    },
    //串口自定义
    serialOutContentes(e) {
      let xianshi = document.getElementById("serialOutContentess");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.submitDisabled = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabled = false;
      }
    },
    //
    displayModContentes(e) {
      let xianshi = document.getElementById("displayModContentess");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.submitDisabled = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabled = false;
      }
    },
    //recCardFaceValu
    recCardFaceValues(e) {
      let xianshi = document.getElementById("recCardFaceValues");
      let xianshis = document.getElementById("recCardFaceValuess");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (/^-([1-9]\d*(\.\d+)?|0\.\d*[1-9])$/.test(_value)) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else if (_value == "") {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else if (_value > 100) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else if (_value < 0) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else {
        xianshi.style.display = "none";
        xianshis.style.display = "inline";
        this.suDisabled = false;
      }
    },
    //人脸识别阈值
    recDoubleValuess(e) {
      let xianshi = document.getElementById("recDoubleValues");
      let xianshis = document.getElementById("recDoubleValueses");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (/^-([1-9]\d*(\.\d+)?|0\.\d*[1-9])$/.test(_value)) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else if (_value == "") {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else if (_value > 100) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else if (_value < 0) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.suDisabled = true;
      } else {
        xianshi.style.display = "none";
        xianshis.style.display = "inline";
        this.suDisabled = false;
      }
    },
    //
    //语音自定义
    ttsModContentdata(e) {
      let xianshi = document.getElementById("tts");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (_value === "") {
        xianshi.style.display = "inline";
        this.submitDisabled = true;
      } else {
        xianshi.style.display = "none";
        this.submitDisabled = false;
      }
    },
    //识别分数
    identifyScoresdata(e) {
      let xianshi = document.getElementById("ident");
      let xianshis = document.getElementById("idents");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (/^-([1-9]\d*(\.\d+)?|0\.\d*[1-9])$/.test(_value)) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value == "") {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value > 100) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value < 0) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else {
        xianshi.style.display = "none";
        xianshis.style.display = "inline";
        this.submitDisabled = false;
      }
    },
    //陌生人判断次数
    number(e) {
      let xianshi = document.getElementById("recStranes");
      let xianshis = document.getElementById("recStraneses");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (/^-([1-9]\d*(\.\d+)?|0\.\d*[1-9])$/.test(_value)) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      }
      if (/^((?!1)\d{1,2}|21)$/.test(_value)) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value == "") {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value > 20) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value < 1) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else {
        xianshi.style.display = "none";
        xianshis.style.display = "inline";
        this.submitDisabled = false;
      }
    },
    //开门延时
    delayTime(e) {
      var _value = e.target.value; // 获取到输入框的value值
      let xianshi = document.getElementById("delayTimees");
      let xianshis = document.getElementById("delayTimeeses");

      let delayTimeForCloseDoors = document.getElementById(
        "delayTimeForCloseDoors"
      );
      // console.log(_value);
      if (/^-([1-9]\d*(\.\d+)?|0\.\d*[1-9])$/.test(_value)) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value == "") {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (/^((?!100)\d{1,2}|25500)$/.test(_value)) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value > 25500) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value < 100) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else {
        xianshi.style.display = "none";
        xianshis.style.display = "inline";
        this.submitDisabled = false;
      }
    },

    //识别间隔
    regIntervaldata(e) {
      let xianshi = document.getElementById("regIntervales");
      let xianshis = document.getElementById("regIntervaleses");
      var _value = e.target.value; // 获取到输入框的value值
      // console.log(_value);
      if (/^-([1-9]\d*(\.\d+)?|0\.\d*[1-9])$/.test(_value)) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value == "") {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value > 25500) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else if (_value < 500) {
        xianshi.style.display = "inline";
        xianshis.style.display = "none";
        this.submitDisabled = true;
      } else {
        xianshi.style.display = "none";
        xianshis.style.display = "inline";
        this.submitDisabled = false;
      }
    },
    huidiao() {
      const api = "http://192.168.10.175:8088/device/setIdentifyCallBack";
      this.$axios({
        url: api,
        method: "post",
        data: {
          duankou: this.Datalist.port,
          ip: this.ip,
          pass: this.devicePass,
          url: this.Datalist.ips,
        },
      }).then((res) => {
        // console.log(res);
        // this.msgSuccess(res.data.msg);
        if (res.data.success == true) {
          this.msgSuccess("操作成功");
        } else {
          this.msgError("操作失败");
        }
      });
    },
    xintiao() {
      const api = " http://192.168.10.175:8088/device/setDeviceHeartBeat";
      this.$axios({
        url: api,
        method: "post",
        data: {
          duankou: this.Datalist.port,
          ip: this.ip,
          pass: this.devicePass,
          url: this.Datalist.ips,
          interval:this.Datalist.interval
        },
      }).then((res) => {
        // console.log(res);
        if (res.data.success == true) {
          this.msgSuccess(res.data.msg);
        } else {
          this.msgError(res.data.msg);
        }
      });
    },
    zhucezhao(){
      const api = " http://192.168.10.175:8088/device/setImgRegCallBack";
      this.$axios({
        url: api,
        method: "post",
        data: {
          duankou: this.Datalist.port,
          ip: this.ip,
          pass: this.devicePass,
          url: this.Datalist.ips,
          interval:this.Datalist.interval
        },
      }).then((res) => {
        // console.log(res);
        if (res.data.success == true) {
          this.msgSuccess(res.data.msg);
        } else {
          this.msgError(res.data.msg);
        }
      });
    },
    woful(){
      const api = " http://192.168.10.175:8088/device/callback";
      this.$axios({
        url: api,
        method: "get",
        params: {
          ip:this.ip,
          pass:this.devicePass,
        },
      }).then((res) => {
        // console.log(res);
        this.jihe=res.data
      });
    },
    ///语音模式
    currentSel(selVal) {
      this.code = selVal.code;
      this.name = selVal.label;
      // console.log("选择的name为：" + this.name, "选择的code为:" + this.code);
      let ttsModContentes = document.getElementById("ttsModContent");
      // let ttsModContents = document.getElementById("ttsModContents");
      // console.log(selVal);
      if (selVal == "100") {
        ttsModContentes.style.display = "block";
        // ttsModContents.style.display = "block";
      } else if (selVal == "1") {
        ttsModContentes.style.display = "none";
        // ttsModContents.style.display = "none";
      } else if (selVal == "2") {
        ttsModContentes.style.display = "none";
        // ttsModContents.style.display = "none";
      }
    },
    //显示模式
    currentdisplayModType(selVal) {
      this.code = selVal.code;
      this.name = selVal.label;
      // console.log("选择的name为：" + this.name, "选择的code为:" + this.code);
      let displayModContentes = document.getElementById("displayModContent");
      let displayModContentss = document.getElementById("displayModContentss");
      // console.log(selVal);
      if (selVal == "100") {
        displayModContent.style.display = "block";
        displayModContentss.style.display = "block";
      } else if (selVal == "1") {
        displayModContent.style.display = "none";
        displayModContentss.style.display = "none";
      } else if (selVal == "2") {
        displayModContent.style.display = "none";
        displayModContentss.style.display = "none";
      }
    },
    //串口模式
    currentSelserialOutMode(selVal) {
      this.code = selVal.code;
      this.name = selVal.label;
      // console.log("选择的name为：" + this.name, "选择的code为:" + this.code);
      let serialOutContentes = document.getElementById("serialOutContent");
      let serialOutContentss = document.getElementById("serialOutContentss");
      // console.log(selVal);
      if (selVal == "2") {
        serialOutContentes.style.display = "block";
        serialOutContentss.style.display = "block";
      } else if (selVal == "1") {
        serialOutContentes.style.display = "none";
        serialOutContentss.style.display = "none";
      } else if (selVal == "3") {
        serialOutContentes.style.display = "none";
        serialOutContentss.style.display = "none";
      }
    },
    //陌生人语音模式
    currentSelttsModStrangerType(selVal) {
      this.code = selVal.code;
      this.name = selVal.label;
      // console.log("选择的name为：" + this.name, "选择的code为:" + this.code);
      let displayModStrangerContentes = document.getElementById(
        "displayModStrangerContent"
      );

      // console.log(selVal);
      if (selVal == "100") {
        displayModStrangerContentes.style.display = "block";
      } else if (selVal == "1") {
        displayModStrangerContentes.style.display = "none";
      } else if (selVal == "2") {
        displayModStrangerContentes.style.display = "none";
      }
    },
    //设备重置
    chzhi() {
      if (this.deviceName == undefined) {
        this.msgError("请选中设备名称!");
      }
      const api = "http://192.168.10.175:8088/device/reset";
      this.$axios({
        url: api,
        method: "post",
        data: {
          ip: this.ip,
          pass: this.devicePass,
          Boolean:this.radio,
        },
        timeout: 3000, //设置超时，单位毫秒
      })
        .then((res) => {
          // console.log(res);
          // this.msgSuccess(res.data.msg);
          if (res.data.success == true) {
            this.msgSuccess("操作成功！！！");
          } else if (res.data.success == false) {
            this.msgError("操作失败！！！");
          }
        })
        .catch((error) => {
          this.msgError("请求超时，请重试!");
        });
    },

    // 获取ip地址
    getip() {
      if (this.deviceName == undefined) {
        this.msgError("请选中设备名称!");
      }
      const api = "http://192.168.10.175:8088/device/getSno";
      this.$axios({
        url: api,
        method: "get",
        params: {
          ip: this.ip,
        },
      }).then((res) => {
        // console.log(res);
        this.formes.serialNum = res.data.data;
        // console.log(this.formes.serialNum);
      });
    },
    submitFormes() {
      if (this.deviceName == undefined) {
        this.msgError("请选中设备名称!");
      }
      var dataes = JSON.stringify(this.formData);
      // console.log(dataes);
      const api = "http://192.168.10.175:8088/device/setConfig";
      this.$axios({
        url: api,
        method: "post",
        data: JSON.stringify({
          ip: this.ip,
          pass: this.devicePass,
          config: dataes,
        }),
      }).then((res) => {
        // console.log(res);
        // console.log(res.config.data);
        if (res.data.success == true) {
          this.msgSuccess("设置成功");
        } else if (res.data.success == false) {
          this.msgError("设置失败," + res.data.msg + "!!!");
        }
        // this.ip = "";
        // this.devicePass = "";
        // this.deviceName = null;
        // this.resetForm("form");
      });
    },

    //识别模式参数
    onSubmit() {
      if (this.deviceName == undefined) {
        this.msgError("请选中设备名称!");
      } else {
        var dataes = JSON.stringify(this.forms);
        // console.log(dataes);
        const api = "http://192.168.10.175:8088/device/setConfig";
        this.$axios({
          url: api,
          method: "post",
          data: JSON.stringify({
            ip: this.ip,
            pass: this.devicePass,
            config: dataes,
          }),
        }).then((res) => {
          // console.log(res);
          // console.log(res.config.data);
          if (res.data.success == true) {
            this.msgSuccess("设置成功");
          } else if (res.data.success == false) {
            this.msgError("设置失败," + res.data.msg);
          }
          // this.ip = "";
          // this.devicePass = "";
          // this.deviceName = null;
          // this.resetForm("form");
        });
      }
    },

    getValue() {
      // console.log(this.forms.recModeCardEnable); // 打印的值，就是被选中的radio的值，1,2
      if (this.forms.recModeCardEnable == 1) {
        this.forms.recModeCardFaceEnable = 2;
        // console.log(this.forms.recModeCardFaceEnable); // 打印的值，就是被选中的radio的值，1,2
        let recModeCardFaceIntfes = document.getElementById(
          "recModeCardFaceIntf"
        );
        recModeCardFaceIntfes.style.display = "none";
        this.forms.recModeCardFaceIntf = 2;
        this.forms.recModeCardFaceHardwar = 3;
        let recModeCardFaceHardwarees = document.getElementById(
          "recModeCardFaceHardware"
        );
        recModeCardFaceHardwarees.style.display = "none";
      } else {
        this.forms.recModeCardFaceEnable = 1;
        // console.log(this.forms.recModeCardFaceEnable); // 打印的值，就是被选中的radio的值，1,2
        let recModeCardFaceIntfes = document.getElementById(
          "recModeCardFaceIntf"
        );
        recModeCardFaceIntfes.style.display = "block";
        let recModeCardFaceHardwarees = document.getElementById(
          "recModeCardFaceHardware"
        );
        recModeCardFaceHardwarees.style.display = "block";
      }
    },
    getValues() {
      // console.log(this.forms.recModeCardFaceEnable); // 打印的值，就是被选中的radio的值，1,2
      if (this.forms.recModeCardFaceEnable == 1) {
        this.forms.recModeCardEnable = 2;
        // console.log(this.forms.recModeCardEnable); // 打印的值，就是被选中的radio的值，1,2
        let recModeCardFaceIntfes = document.getElementById(
          "recModeCardFaceIntf"
        );
        recModeCardFaceIntfes.style.display = "block";
        let recModeCardFaceHardwarees = document.getElementById(
          "recModeCardFaceHardware"
        );
        recModeCardFaceHardwarees.style.display = "block";
        this.forms.recModeCardFaceIntf = 2;
        this.forms.recModeCardFaceHardwar = 3;
      } else {
        this.forms.recModeCardEnable = 1;
        // console.log(this.forms.recModeCardFaceEnable); // 打印的值，就是被选中的radio的值，1,2
        let recModeCardFaceIntfes = document.getElementById(
          "recModeCardFaceIntf"
        );
        recModeCardFaceIntfes.style.display = "none";
        let recModeCardFaceHardwarees = document.getElementById(
          "recModeCardFaceHardware"
        );
        recModeCardFaceHardwarees.style.display = "none";
      }
    },
    //网络参数
    getsetNetInfo() {
      if (this.deviceName == undefined) {
        this.msgError("请点击选中设备!");
      } else if (this.deviceName === null) {
        this.msgError("请点选中设备!");
      }
      const api = "http://192.168.10.175:8088/device/setNetInfo";
      this.$axios({
        url: api,
        method: "post",
        //用于表示用户代理是否在跨域请求的情况下从其他域中发送cookies
        //  withCredentials:true,//默认为false
        data: JSON.stringify({
          ip: this.ip,
          setip:this.setip,
          pass: this.devicePass,
          isDHCPMod: this.formesData.isDHCPMod,
          gateway: this.formesData.gateway,
          subnetMask: this.formesData.subnetMask,
          DNS: this.formesData.DNS,
        }),
        // timeout: 2000, //设置超时，单位毫秒
      })
        .then((res) => {
          if (res.data.success == true) {
            this.msgSuccess("设置成功");
            this.form.newPass = "";
            this.form.oldPass = "";
            this.resetForm("form");
          } else if (res.data.success == false) {
            this.msgError("设置失败," + res.data.msg);
          }
        })
        // .catch((error) => {
        //   this.msgError("请求超时，请重试!");
        // });
    },
    //修改密码
    getactiops() {
      if (this.deviceName == undefined) {
        this.msgError("请点击选中设备!");
      } else if (this.deviceName === null) {
        this.msgError("请点选中设备!");
      }
      const api = "http://192.168.10.175:8088/device/setPass";
      this.$axios({
        url: api,
        method: "post",
        //用于表示用户代理是否在跨域请求的情况下从其他域中发送cookies
        //  withCredentials:true,//默认为false
        params: {
          id: this.id,
          ip: this.ip,
          newPass: this.form.newPass,
          oldPass: this.form.oldPass,
        },
        // timeout: 2000, //设置超时，单位毫秒
      })
        .then((res) => {
          if (res.data.success == true) {
            this.msgSuccess("修改成功");
            this.getList();
            this.form.newPass = "";
            this.form.oldPass = "";
            this.resetForm("form");
          } else if (res.data.success == false) {
            this.msgError("修改失败," + res.data.msg);
          }
        })
        // .catch((error) => {
        //   this.msgError("请求超时，请重试!");
        // });
    },
    // 表单重置
    reset(ip) {
      this.form = {
        id: undefined,
        deviceName: undefined,
        deviceType: undefined,
        deviceUse: undefined,
        deviceScenarios: undefined,
        serialNum: undefined,
        port: undefined,
        ip: ip,
        devicePass: undefined,
        macAddress: undefined,
        deviceDirection: undefined,
        deviceDesc: undefined,
        crtime: undefined,
        uptime: undefined,
        author: undefined,
        upauthor: undefined,
      };
      this.resetForm("form");
    },

    btnnum() {
      this.$router.push("/menjin/listadd");
    },
    /** 查询设备基础信息列表 */
    getList() {
      // this.loading = true;
      // listAddupda(this.queryParams).then((response) => {
      //   this.DeviceBaseinfoList = response.rows;
      //   console.log(this.DeviceBaseinfoList);
      //   this.total = response.total;
      //   this.loading = false;
      // });
    },
    // 设备类型字典翻译
    deviceTypeFormat(row, column) {
      return this.selectDictLabel(this.deviceTypeOptions, row.deviceType);
    },
    // 设备用处字典翻译
    deviceUseFormat(row, column) {
      return this.selectDictLabel(this.deviceUseOptions, row.deviceUse);
    },
    // 应用场景字典翻译
    deviceScenariosFormat(row, column) {
      return this.selectDictLabel(
        this.deviceScenariosOptions,
        row.deviceScenarios
      );
    },
    // 方向字典翻译
    deviceDirectionFormat(row, column) {
      return this.selectDictLabel(
        this.deviceDirectionOptions,
        row.deviceDirection
      );
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },

    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加设备基础信息";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids;
      getDeviceBaseinfo(id).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "修改设备基础信息";
      });
    },
    /** 提交按钮 */
    submitForm: function () {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.id != undefined) {
            updateDeviceBaseinfo(this.form).then((response) => {
              if (response.code === 200) {
                this.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              }
            });
          } else {
            addDeviceBaseinfo(this.form).then((response) => {
              if (response.code === 200) {
                this.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              }
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm(
        '是否确认删除设备基础信息编号为"' + ids + '"的数据项?',
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(function () {
          return delDeviceBaseinfo(ids);
        })
        .then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
        .catch(function () {});
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm("是否确认导出所有设备基础信息数据项?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(function () {
          return exportDeviceBaseinfo(queryParams);
        })
        .then((response) => {
          this.download(response.msg);
        })
        .catch(function () {});
    },
  },
};
</script>
<style  scoped>
.xuanze{
  margin-left: 120px;
}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
.setNet {
  color: #444a5f;
  font-weight: 600;
}
.setNetInfoes {
  margin-top: 25px;
  height: 380px;
  /* position: absolute; */
  /* top: 5%; */
}
.setNetInfoess {
  margin-top: 25px;
  height: 170px;
}
.el-upload--picture-card {
  width: 300px !important;
}
.setNetInfoesss {
  margin-top: 25px;
  height: 280px;
}
.formse {
  margin-left: 180px;
}
.fanhui {
  border: none;
  color: #2b2f3a;

  font-size: 14px;
}
.bg-purple-dark {
  background: #f1f4f7;
  border-radius: 5px;
  line-height: 3px;
}
.primaryesss{
  margin-left: 10px;
  margin-top: 25px;
}
.primaryes {
  margin-left: 150px;
  margin-top: 25px;
}
#recCardFaceValuess {
  color: #8c8c8c;
  font-size: 12px;
  margin-left: 10px;
  font-family: 微软雅黑;
}
#recDoubleValueses {
  color: #8c8c8c;
  font-size: 12px;
  margin-left: 10px;
  font-family: 微软雅黑;
}
#recStraneses {
  color: #8c8c8c;
  font-size: 12px;
  margin-left: 10px;
  font-family: 微软雅黑;
}
#delayTimeeses {
  color: #8c8c8c;
  font-size: 12px;
  margin-left: 10px;
  font-family: 微软雅黑;
}
#regIntervaleses {
  color: #8c8c8c;
  font-size: 12px;
  margin-left: 10px;
  font-family: 微软雅黑;
}
#idents {
  color: #8c8c8c;
  font-size: 12px;
  margin-left: 10px;
  font-family: 微软雅黑;
}
.errores {
  color: red;
  /* font-size: 12px; */
}
#app {
  margin-top: 0 !important;
}
.ratex {
  position: absolute;
  top: 225px;
  left: 150px;
}

.el-form-item__error {
  position: absolute !important;
  top: 25% !important;
  left: 35% !important;
}
/* 提示语 */
el-form-item__error {
  color: #ff4949;
  font-size: 12px;
  line-height: 1;
  padding-top: 4px;
  position: absolute !important ;
  top: 20% !important;
  left: 37% !important;
}
.top {
  width: 100%;
}
/* .shenum {
  margin-top: 10px;
  margin-left: 0px;
} */
.zita {
  position: absolute;
  top: 60px;
  left: 80px;
}

.btnprim {
  position: absolute;
  top: 98px;
  left: 380px;
}
.btnprimes {
  position: absolute;
  top: 220px;
  left: 486px;
}

.btnin1 {
  position: absolute;
  top: 175px;
  left: 90px;
}
.btnin2 {
  position: absolute;
  top: 175px;
  left: 260px;
}
.btnin3 {
  position: absolute;
  top: 220px;
  left: 400px;
}
.btnin4 {
  position: absolute;
  top: 175px;
  left: 450px;
}
.nth-left-top {
  width: 35%;
  /* height: 800px; */
  float: left;
  /* background-color: violet; */
}
.shaye{
  /*background-color: #4AB7BD;*/
  display: flex;
  margin-top: 15px;
  margin-left: 100px;
}
.nth-right-top {
  width: 100%;
  /* background-color: #f0f1f6; */
  height: 1260px;
  /* float: right; */
}
/* 输入框部分 */
.el-input {
  width: 50%;
}

.btnprimauu {
  position: absolute;
  top: 200px;
  left: 100px;
}
ul li{
  list-style: none;
}
ul{
  padding-inline-start: 10px !important;
}
.el-input[data-v-7e850036] {
  position: absolute;
  width: 50%;
  left: 20px;
}
.el-tabs__nav-scr {
  margin-left: 30px;
  margin-top: 20px;
}
.el-form-item {
  margin-bottom: 0 !important;
  margin-top: 8px !important;
}
.el-header {
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
.labelip {
  position: absolute;
  top: -27px;
  left: 60px;
}
.czhite {
  width: 400px;
  position: absolute;
  left: -30px;
  top: -60px;
}
.tab-pane-top {
  width: 600px;
  /* margin-left: 50px; */
  /* border: 1px solid #dcdcdc; */
  margin-top: 25px;
  height: 260px;
}
.tab-pane-top-zi {
  margin-top: 10px;
}
/* 中间部分 */
.tab-pane-zhong {
  width: 600px;
  height: 240px;
  margin-left: 50px;
  margin-top: 10px;
  border: 2px solid #dcdcdc;
}
/* 下边 */
.tab-pane-bottom {
  width: 600px;
  height: 280px;
  margin-left: 50px;
  margin-top: 10px;
  border: 2px solid #dcdcdc;
}
.el-input__inner {
  position: absolute;
  margin-left: 10px !important;
}

.el-button--primary.is-plain[data-v-7e850036] {
  margin-top: -60px;
  position: absolute;
  left: 450px;
}
/* 按钮 */
.btnprimary {
  position: absolute;
  left: 150px;
  top: 62%;
}
.btnprimarys {
  position: absolute;
  left: 240px;
  top: 62%;
}
.btnprimaryp {
  /*position: absolute;*/
  left: 330px;
  top: 150px;
}
.infinite-list{
  height: 400px;
  /*background-color: #8c939d;*/
  border: 1px solid #8c939d;
}
.infinite-list-item{
  /*height: 15px;*/
  /*background-color: #4AB7BD;*/
  margin-top: 5px;
}
/*.btnprimarypes {*/
/*  position: absolute;*/
/*  left: 210px;*/
/*  top: 200px;*/
/*}*/
.primarytwo {
  position: absolute;
  left: 450px;
  top: 40%;
}
.primarythree {
  position: absolute;
  left: 450px;
  top: 60%;
}
.tab-pane-bottom-botom {
  width: 910px;
  height: 100px;
  border: 2px solid #dcdcdc;
}
</style>
